package org.showminifier.web;

import java.util.Date;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;

/**
*
* Show Minifier
* Author: Shihua Ma <beijing.josh@gmail.com>
* Copyright (c) 2010 Shihua Ma
* Licensed under the MIT license.
*
*/

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class PagePerformance {

	@PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Key key;
	
	@Persistent
	private WebContent webContent;
	
	@Persistent
	private String userAgent;
	
	@Persistent
	private String browser;
	
	@Persistent
	private String version;
	
	@Persistent
	private int originalPerformance = -1;
	
	@Persistent
	private int minifiedPerformance = -1;
	
	@Persistent
	private int originalReflowTime = -1;
	
	@Persistent
	private int minifiedReflowTime = -1;
	
	@Persistent
	private Date requestDate;
	
	@Persistent
	private String ipAddress;
	
	@Persistent
	private int originalLatency = -1;
	
	@Persistent
	private int minifiedLatency = -1;
	
	public Key getKey() {
		return this.key;
	}

	public void setKey(Key key) {
		this.key = key;
	}
	
	
	public String getUserAgent() {
		return this.userAgent;
	}

	public void setUserAgent(String userAgent) {
		this.userAgent = userAgent;
	}

	public String getBrowser() {
		return this.browser;
	}

	public void setBrowser(String browser) {
		this.browser = browser;
	}

	public String getVersion() {
		return this.version;
	}

	public void setVersion(String version) {
		this.version = version;
	}

	public int getOriginalPerformance() {
		return this.originalPerformance;
	}

	public void setOriginalPerformance(int originalPerformance) {
		this.originalPerformance = originalPerformance;
	}

	public int getMinifiedPerformance() {
		return this.minifiedPerformance;
	}

	public void setMinifiedPerformance(int minifiedPerformance) {
		this.minifiedPerformance = minifiedPerformance;
	}

	public Date getRequestDate() {
		return this.requestDate;
	}

	public void setRequestDate(Date requestDate) {
		this.requestDate = requestDate;
	}

	public String getIpAddress() {
		return this.ipAddress;
	}

	public void setIpAddress(String ipAddress) {
		this.ipAddress = ipAddress;
	}

	public int getOriginalReflowTime() {
		return this.originalReflowTime;
	}

	public void setOriginalReflowTime(int originalReflowTime) {
		this.originalReflowTime = originalReflowTime;
	}

	public int getMinifiedReflowTime() {
		return this.minifiedReflowTime;
	}

	public void setMinifiedReflowTime(int minifiedReflowTime) {
		this.minifiedReflowTime = minifiedReflowTime;
	}

	public WebContent getWebContent() {
		return this.webContent;
	}

	public void setWebContent(WebContent webContent) {
		this.webContent = webContent;
	}

	public int getOriginalLatency() {
		return this.originalLatency;
	}

	public void setOriginalLatency(int originalLatency) {
		this.originalLatency = originalLatency;
	}

	public int getMinifiedLatency() {
		return this.minifiedLatency;
	}

	public void setMinifiedLatency(int minifiedLatency) {
		this.minifiedLatency = minifiedLatency;
	}

	
}
